package com.my.bootweb01.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2023/11/7 19:28
 */
// 组件之间没有依赖
@Configuration(proxyBeanMethods = false)
public class WebConfig {

    @Bean
    public HiddenHttpMethodFilter hiddenHttpMethodFilter(){
        HiddenHttpMethodFilter methodFilter = new HiddenHttpMethodFilter();
        // 修改请求方式参数名
        methodFilter.setMethodParam("_m");
        return methodFilter;
    }

}
